package com.hexu.sharedb.service.impl;

import com.hexu.sharedb.entity.SchoolTerm;
import com.hexu.sharedb.service.ThirdService;
import org.springframework.stereotype.Service;

import java.sql.Timestamp;

/**
 * @author gufusheng
 * @time 2021/7/24 20:31
 */
@Service
public class ThirdServiceImpl implements ThirdService {
    @Override
    public SchoolTerm getCurrentTerm() {
        // 调用第三方获取当前学期，这里就模拟下
        SchoolTerm schoolTerm = new SchoolTerm();
        schoolTerm.setTerm("2020-202101"); // 2020-2021 学年 第1学期
        schoolTerm.setTermCount(1);
        schoolTerm.setTermStartDate(Timestamp.valueOf("2020-09-01 00:00:00.0"));
        schoolTerm.setTermEndDate(Timestamp.valueOf("2021-02-15 00:00:00.0"));
        return schoolTerm;
    }
}
